﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows;

namespace Sparkle.UI
{
    public class RegisterdColumn
    {
#if SILVERLIGHT
        public delegate void CreateColumnDelegate(DataGridColumn column);

        public delegate void DataBindingDelegate(DataGridColumn column);
#else
        public delegate void CreateColumnDelegate(ColumnDefinition column);

        public delegate void DataBindingDelegate(ColumnDefinition column);

#endif

        public CreateColumnDelegate OnCreateColumn = null;

        public DataBindingDelegate OnDataBinding = null;

        public Type _columnType = null;

        public Type ColumnType
        {
            get { return _columnType; }
            set { _columnType = value; }
        }

        public DataTemplate CellEditingTemplate { get; set; }

        public DataTemplate CellTemplate { get; set; }

        //public DependencyProperty BindingProperty { get; set; }

        int _defaultWidth = 50;

        /// <summary>
        /// Gets or sets the default width.
        /// </summary>
        /// <value>The default width.</value>
        public int DefaultWidth
        {
            get { return _defaultWidth; }
            set { _defaultWidth = value; }
        }

    }
}
